/*
 * Javlov - a Java toolkit for reinforcement learning with multi-agent support.
 * 
 * Copyright (c) 2009 Matthijs Snel
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package net.javlov.world;

import java.awt.Shape;
import java.awt.geom.Path2D;
import java.awt.geom.Point2D;

/**
 * Doesn't do anything, can be used to represent a goal state.
 * 
 * @author Matthijs Snel
 *
 */
public class GoalBody extends BasicBody {
	//hide field in superclass
	private int type = Body.GOAL;
	
	public GoalBody(double x, double y) {
		location = new Point2D.Double(x, y);
		Path2D.Double cross = new Path2D.Double();
		cross.moveTo(x-20, y-20);
		cross.lineTo(x+20, y+20);
		cross.moveTo(x+20, y-20);
		cross.lineTo(x-20, y+20);
		figure = cross;
	}

	@Override
	public int getType() {
		return type;
	}

	@Override
	public void setType(int type) {
		//type of this body can only be goal
	}
}
